from datetime import datetime
from django.db import models


# Create your models here.

class BackupRecords(models.Model):
    ip = models.GenericIPAddressField(verbose_name="主机IP", null=False)
    file_catalogue = models.FilePathField(verbose_name="文件目录", null=False)
    file_ext = models.FileField(verbose_name="文件后缀", null=False)
    backup_username = models.CharField(verbose_name="备份人", null=False, max_length=20)
    backup_datetime = models.DateTimeField(verbose_name="备份时间", default=datetime.now())
    filename = models.CharField(verbose_name="备份文件名", null=False, max_length=20)
    job_link = models.URLField(verbose_name="JOB链接")